package com.sjzs.web.action;

import com.sjzs.web.common.BaseAction;
import com.sjzs.web.vo.UploadConfig;
import com.sjzs.web.service.UploadConfService;

public class UploadConfAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	private UploadConfig uploadConf;
	private String uploadType;	//上传类型 000 上传安装包
	private UploadConfService uploadConfService;
	private String linkguid;	//上传关联GUID
	private String devuid;
	public String getDevuid() {
		return devuid;
	}
	public void setDevuid(String devuid) {
		this.devuid = devuid;
	}
	public String getLinkguid() {
		return linkguid;
	}
	public void setLinkguid(String linkguid) {
		this.linkguid = linkguid;
	}
	public UploadConfService getUploadConfService() {
		return uploadConfService;
	}
	public void setUploadConfService(UploadConfService uploadConfService) {
		this.uploadConfService = uploadConfService;
	}
	public UploadConfig getUploadConf() {
		return uploadConf;
	}
	public void setUploadConf(UploadConfig uploadConf) {
		this.uploadConf = uploadConf;
	}
	public String getUploadType() {
		return uploadType;
	}
	public void setUploadType(String uploadType) {
		this.uploadType = uploadType;
	}
	/**
	 * 获取上传附件的配置信息
	 * @return
	 */
	public String getAttachConfigure(){
		this.uploadConf = this.uploadConfService.getUploadConfig(uploadType, linkguid);
		uploadConf.setDevuid(devuid);
		return SUCCESS;
	}
	/**
	 * 获取附件信息
	 */
	public void getAttachInfo(){
		super.writeJson(this.uploadConfService.getAttachInfo(linkguid));
	}
}
